package com.jgsu.farm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@Table(name = "spectral")
public class Spectral implements Serializable {
    private Integer spectralid;

    private String name;

    private String format;

    private String description;

    private String author;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date time;

    private String location;

    private String device;

    private String spectralfile;

    public Spectral(String name, String format, String description, String author, Date time, String location, String device, String spectralfile) {
        this.name = name;
        this.format = format;
        this.description = description;
        this.author = author;
        this.time = time;
        this.location = location;
        this.device = device;
        this.spectralfile = spectralfile;
    }
}